package com.login_php.service;

import com.login_php.actions.BaseServiceAction;

public class IsUsuarioLogadoService extends BaseServiceAction{

	private static final long serialVersionUID = -5636161761370925940L;
	private int id;
	private String isLogged = Boolean.FALSE.toString();
	
	@Override
	public String doExecute() {
		if(getAplicationEng().getUsuarioEng().isUsuarioLogado()){
			setIsLogged(new Boolean(getAplicationEng().getUsuarioEng().getUSuarioLogado().getId() == id).toString());
		}
		
		return SUCCESS;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	protected boolean isLoginRequired() {
		return false;
	}

	public String getIsLogged() {
		return isLogged;
	}

	public void setIsLogged(String isLogged) {
		this.isLogged = isLogged;
	}

}
